package com.xx.mapper;

import com.xx.entity.Products;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xx.entity.ProductsDisplay;
import com.xx.vo.ProductsDisplayVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface ProductsMapper extends BaseMapper<Products> {

    ProductsDisplay queryById(Integer productId);

    List<ProductsDisplay> queryAllByLimit(Products products);

    long count(Products products);

    int insert(Products products);

    int insertBatch(@Param("entities") List<Products> entities);

    int insertOrUpdateBatch(@Param("entities") List<Products> entities);

    int update(Products products);

    int deleteById(Integer productId);

    String selectImageUrl(@Param("productId") Integer productId);

    List<ProductsDisplayVO> selectAllByProductIds(@Param("products") List<Integer> products);
}
